package com;

import com.fz.entity.Student;
import com.fz.mapper.StudentMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * Created by bai on 2017/7/6.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:beans.xml")
public class MyOk {

    @Autowired
    Student s;

    @Autowired
    StudentMapper st;

    @Test
    public void a() {
        //System.out.println(s.getName());
        List<Student> list = st.query();
        for (Student st: list){
          System.out.println(st.getTeacher());
            System.out.println(s);
            System.out.println(st);

        }
        //System.out.println(s.getTeacher());
    }

}
